package cn.tedu.csmall.stock.webapi.quartz;

import cn.tedu.csmall.commons.pojo.stock.model.StockTb;
import cn.tedu.csmall.stock.webapi.quartz.config.RabbitStockConfig;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = {RabbitStockConfig.STOCK_TB_QUEUE})
public class RabbitStockConsumer {

    @RabbitHandler
    public void getStock(StockTb stock){
        System.out.println("接收到消息:"+stock);
    }


}
